package com.itlong.cloud.project.property;

import com.itlong.cloud.POJO.DTO.app.APPServiceGetAccountDetailDTO;
import com.itlong.cloud.POJO.DTO.app.APPServiceGetAccountPageDTO;
import com.itlong.cloud.POJO.DTO.app.APPServiceTemporaryCarBillDTO;
import com.itlong.cloud.POJO.DTO.common.NettyServiceDTO;
import com.itlong.cloud.POJO.DTO.property.PropertyAccountGetDTO;
import com.itlong.cloud.POJO.PO.PropertyPaymentBillPO;
import com.itlong.cloud.POJO.VO.app.*;
import com.itlong.cloud.POJO.VO.property.*;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <desc>
 *      物业账单服务接口协议提供对象
 * </desc>
 *
 * @createDate 2018-08-13
 */
@FeignClient(name = "project-service")
public interface IPropertyAccountServiceClient {

    /**
     * <desc>
     *     分页查询运营账单
     * <desc/>
     *
     * @param  propertyAccountGetDTO  分页查询未缴账单
     * @return  MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2019/06/06
     */
    @PostMapping(path = "/expenses/account/getOperateBillByPage")
    Page<PropertyPaymentVO> getOperateBillByPage(@RequestBody PropertyAccountGetDTO propertyAccountGetDTO) throws Exception;

    /**
     * <desc>
     *     分页查询未缴账单
     * <desc/>
     *
     * @param  propertyAccountGetDTO  分页查询未缴账单
     * @return  MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/08/13
     */
    @PostMapping(path = "/expenses/account/getUnpaymentByPage")
    Page<PropertyUnpaymentVO> getUnpaymentByPage(@RequestBody PropertyAccountGetDTO propertyAccountGetDTO) throws Exception;

    /**
     * <desc>
     *     分页查询已缴账单
     * <desc/>
     *
     * @param  propertyAccountGetDTO  分页查询已缴账单
     * @return  MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/08/13
     */
    @PostMapping(path = "/expenses/account/getPaymentByPage")
    Page<PropertyPaymentVO> getPaymentByPage(@RequestBody PropertyAccountGetDTO propertyAccountGetDTO) throws Exception;

    /**
     * <desc>
     *     根据FeeId,或者查询条件 查询未缴账单
     * <desc/>
     *
     * @param propertyAccountGetDTO 查询条件
     * @return  MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/08/13
     */
    @PostMapping(path = "/expenses/account/getUnpaymentByFeeIds")
    List<PropertyUnpaymentVO> getUnpaymentByFeeIds(@RequestBody PropertyAccountGetDTO propertyAccountGetDTO) throws Exception;

    /**
     * <desc>
     *     根据FeeId,或者查询条件 查询已缴账单
     * <desc/>
     *
     * @param propertyAccountGetDTO 查询条件
     * @return  MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/08/13
     */
    @PostMapping(path = "/expenses/account/getPaymentByFeeIds")
    List<PropertyPaymentVO> getPaymentByFeeIds(@RequestBody PropertyAccountGetDTO propertyAccountGetDTO) throws Exception;

    /**
     * <desc>
     *     根据FeeId,或者查询条件 查询账单
     * <desc/>
     *
     * @param propertyAccountGetDTO 查询条件
     * @return  MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2019/06/06
     */
    @PostMapping(path = "/expenses/account/getOperatePaymentByFeeIds")
    List<PropertyPaymentVO> getOperatePaymentByFeeIds(@RequestBody PropertyAccountGetDTO propertyAccountGetDTO) throws Exception;

    /**
     * <desc>
     *     查询缴费账单明细
     * <desc/>
     *
     * @param feeId 缴费账单ID
     * @param projectId 项目编号
     * @return  MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/08/15
     */
    @PostMapping(path = "/expenses/account/getAccountDetail")
    PropertyAccountDetailVO getAccountDetail(@RequestParam("feeId")String feeId, @RequestParam("projectId")String projectId) throws Exception;

    /**
     * <desc>
     *     APP获取账单详情,返回最新账单
     * <desc/>
     *
     * @param appServiceGetAccountDetailDTO APP获取账单详情条件
     * @param userId 用户编号
     * @return  MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/08/16
     */
    @PostMapping(path = "/expenses/account/getAccountDetailForAPP")
    AppServiceAccountDetailVO getAccountDetailForAPP(@RequestBody APPServiceGetAccountDetailDTO appServiceGetAccountDetailDTO,
                                                     @RequestParam("userId")String userId) throws Exception;

    /**
     * <desc>
     *     查询账单缴费状态
     * <desc/>
     *
     * @param feeId 缴费账单ID
     * @param projectId 项目编号
     * @return  MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/08/15
     */
    @PostMapping(path = "/expenses/account/getFeeStatus")
    String getFeeStatus(@RequestParam("feeId")String feeId, @RequestParam("projectId")String projectId) throws Exception;

    /**
     * <desc>
     *     账单支付
     * <desc/>
     *
     * @param feeId 缴费账单ID
     * @param projectId 项目编号
     * @param paymentType 收费方式：1现金 2银行转账 3支付宝转账 4微信转账 5小区收款码-微信 6小区收款码-支付宝 7其他支付方式
     * @param loginUserId 操作员ID
     * @return  MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/08/15
     */
    @PostMapping(path = "/expenses/account/payment")
    List<AppUserAndRoomInfoVO> payment(@RequestParam("feeId")String feeId, @RequestParam("projectId")String projectId,
                                       @RequestParam("paymentType")String paymentType, @RequestParam("loginUserId")String loginUserId) throws Exception;

    /**
     * <desc>
     *      APP分页获取账单列表
     * </desc>
     *
     * @param appServiceGetAccountPageDTO 获取账单列表DTO
     * @return MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/08/21
     */
    @PostMapping(path = "/expenses/account/getAccountBypageForAPP")
    Page<AppServiceAccountInfoALLVO> getAccountBypageForAPP(@RequestBody APPServiceGetAccountPageDTO appServiceGetAccountPageDTO,
                                                            @RequestParam("userId")String userId) throws Exception;

    /**
     * <desc>
     *      统计账单滞纳金
     * </desc>
     *
     * @throws Exception
     * @author wangzhi
     * @createDate 2018/08/29
     */
    @PostMapping(path = "/expenses/account/statisticsPenalty")
    List<PropertyArrearageBillGetVO> statisticsPenalty() throws Exception;

    /**
     * <desc>
     *      重新进行欠费联动
     * </desc>
     *
     * @throws Exception
     * @author wangzhi
     * @createDate 2018/08/29
     */
    @PostMapping(path = "/expenses/account/statisticsPenaltyForProperty")
    List<PropertyArrearageBillGetVO> statisticsPenaltyForProperty(@RequestParam("projectId") String projectId) throws Exception;

    /**
     * <desc>
     *      获取需要发送催费短信的组装信息对象
     * </desc>
     *
     * @return 催费短信组装信息对象
     * @author wangzhi
     * @createDate 2018/08/31
     */
    @PostMapping(path = "/expenses/account/getRushFeeMessage")
    List<PropertyRushFeeMessageVO> getRushFeeMessage() throws Exception;

    /**
     * <desc>
     *      根据房间编号获取未缴费账单个数
     * </desc>
     *
     * @param roomId 房间编号
     * @return 催费短信组装信息对象
     * @author Qiang.S
     * @createDate 2018/09/18
     */
    @PostMapping(path = "/expenses/account/getAccountByRoomId")
    Integer getAccountByRoomId(@RequestParam("roomId")String roomId) throws Exception;

    /**
     * <desc>
     *      生成临时车辆停车账单
     * </desc>
     *
     * @param appServiceTemporaryCarBillDTO 生成账单必要信息
     * @param userId 用户编号
     * @return
     * @author Qiang.S
     * @createDate 2018/11/07
     */
    @PostMapping(path = "/expenses/account/temporaryCarBill")
    AppServiceTemporaryCarBillVO temporaryCarBill(@RequestBody APPServiceTemporaryCarBillDTO appServiceTemporaryCarBillDTO, @RequestParam("userId")String userId) throws Exception;

    /**
     * <desc>
     *      计算停车费金额
     * </desc>
     *
     * @param plateNumber 车牌
     * @param redeemCode 兑换码
     * @param projectId 项目编号
     * @return 账单编号
     * @author Qiang.S
     * @createDate 2018/11/12
     */
    @PostMapping(path = "/expenses/account/calculationAmount")
    NettyServiceDTO calculationAmount(@RequestParam("plateNumber")String plateNumber,
                                      @RequestParam("redeemCode")String redeemCode,
                                      @RequestParam("projectId")String projectId) throws Exception;

    /**
     * <desc>
     *      停车业务判断
     * </desc>
     *
     * @param appServiceTemporaryCarBillDTO
     * @return 账单编号
     * @author Qiang.S
     * @createDate 2018/11/15
     */
    @PostMapping(path = "/expenses/account/checkCarBill")
    AppServiceTemporaryCarBillVO checkCarBill(@RequestBody APPServiceTemporaryCarBillDTO appServiceTemporaryCarBillDTO) throws Exception;

    /**
     * <desc>
     *      查询全部欠费账单
     * </desc>
     *
     * @param projectId 项目编号
     * @param deviceId 设备序号
     * @param deviceType 设备类型
     * @param roomId 房间编号
     * @param userId 用户编号
     * @return
     * @author Qiang.S
     * @createDate 2019/05/28
     */
    @PostMapping(path = "/expenses/account/getAllArrearsBill")
    H5ServiceAccountInfoVO getAllArrearsBill(@RequestParam("projectId")String projectId,
                                             @RequestParam("deviceId")String deviceId,
                                             @RequestParam("deviceType")String deviceType,
                                             @RequestParam(value = "roomId",required = false)String roomId,
                                             @RequestParam(value = "userId",required = false)String userId) throws Exception;

    /**
     * <desc>
     *      查询小程序全部欠费账单
     * </desc>
     *
     * @param projectId 项目编号
     * @param userId 用户编号
     * @return
     * @author Qiang.S
     * @createDate 2019/06/03
     */
    @PostMapping(path = "/expenses/account/getAllArrearsBillForMini")
    H5ServiceAccountInfoVO getAllArrearsBillForMini(@RequestParam("projectId")String projectId,
                                                    @RequestParam("userId")String userId) throws Exception;

    /**
     * <desc>
     *      创建并获取临时通行账单
     * </desc>
     *
     * @param projectId 项目编号
     * @param userId 用户编号
     * @return
     * @author Qiang.S
     * @createDate 2019/05/28
     */
    @PostMapping(path = "/expenses/account/createTemporaryPassageBill")
    H5ServiceTemporaryPassageBillVO createTemporaryPassageBill(@RequestParam("projectId")String projectId,
                                                               @RequestParam("userId")String userId) throws Exception;

    /**
     * <desc>
     *      查询用户历史账单
     * </desc>
     *
     * @param projectId 项目编号
     * @param roomId 房间编号
     * @return
     * @author Qiang.S
     * @createDate 2019/06/03
     */
    @PostMapping(path = "/expenses/account/getUserBillListH5")
    List<H5ServiceAccountListVO> getUserBillListH5(@RequestParam("projectId")String projectId,
                                                   @RequestParam("roomId")String roomId) throws Exception;

    /**
     * <desc>
     *      获取待推送缴费通知的账单信息
     * </desc>
     *
     * @return 待推送缴费通知的账单信息
     * @author wangzhi
     * @createDate 2019/06/13
     */
    @PostMapping(path = "/expenses/account/getPushPayNoticeBill")
    List<PropertyPaymentBillPO> getPushPayNoticeBill() throws Exception;
}
